import request from '@/utils/request'

export function getBoxTypeAPI(data) {
  return request({
    url: '/api/inbound/parseScanCode',
    method: 'post',
    data: data
  })
}

export function checkBoxAPI(data) {
  return request({
    url: '/api/inbound/checkBoxCode',
    method: 'post',
    data: data
  })
}

export function bindAPI(data) {
  return request({
    url: '/api/inbound/bindReelToBox',
    method: 'post',
    data: data
  })
}

export function getPortInfoAPI(data) {
  return request({
    url: '/api/port/availableInbound',
    method: 'get',
    data: data
  })
}

export function getBoxInfoAPI(params) {
  return request({
    url: '/api/materialBoxBind/page',
    method: 'get',
    params
  })
}

export function unBindAPI(data) {
  return request({
    url: '/api/materialBoxBind/unbindByContainer',
    method: 'post',
    data
  })
}

export function clearCacheAPI(data) {
  return request({
    url: '/api/inbound/clearPlantConfirmCache',
    method: 'post',
    data
  })
}

export function clearOrderCacheAPI(data) {
  return request({
    url: '/api/inbound/clearOrderConfirmCache',
    method: 'post',
    data
  })
}

// 异常上报
export function errorReportAPI(data) {
  return request({
    url: '/api/port/reportAbnormal',
    method: 'post',
    data
  })
}


// export function checkWarehouseFullAPI(data) {
//   return request({
//     url: '/api/inbound/isWarehouseFull',
//     method: 'post',
//     data: data
//   })
// }